package com.vercon.common.wifi

import android.net.wifi.ScanResult

/**
 * Created by YZC on 2019/6/26
 * 1.通过 EasyzcWifi 设置监听，在UI中操作
 * 2.EasyzcWifi 接收wifi广播并处理相关逻辑操作
 */
interface EasyzcWifiStateListener {

    fun onScanResult(list: List<ScanResult>)

    fun onNetWorkStateChanged()

    fun onWiFiStateChanged()

    fun onConnectFault()

    fun onConnectSuccess(scanResult: ScanResult?)

    fun onDisconnected()

    fun onConnecting()

    fun onScaning()
}


/**
 * wifi信号
 */
//fun getResId(level: Int): Int = when {
//    level <= 0 -> R.drawable.ic_wifi_level_new_01
//    level <= 50 -> R.drawable.ic_wifi_level_new_11
//    level <= 70 -> R.drawable.ic_wifi_level_new_2
//    level <= 90 -> R.drawable.ic_wifi_level_new_3
//    level <= 100 -> R.drawable.ic_wifi_level_new_4
//    else -> R.drawable.ic_wifi_level_new_not
//}

